// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   PostSearchController.java

package dale.web.post.controller;

import dale.web.PageUtils;
import dale.web.domain.Condition;
import dale.web.post.domain.Post;
import dale.web.post.service.PostService;
import org.springframework.ui.Model;

public class PostSearchController
{

    public PostSearchController(PostService service)
    {
        this.service = service;
    }

    public void get(Post post, Condition condition, Model model)
    {
        java.util.List postList = service.search(post, condition);
        model.addAttribute("postList", postList);
        int numRows = service.count(post, condition);
        int pageNo = condition.getPage();
        String pager = PageUtils.getPagerHTML(numRows, pageNo);
        model.addAttribute("pager", pager);
    }

    public Condition condition()
    {
        return new Condition();
    }

    private PostService service;
}
